package com.rjt.table.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author 7
 * @create 2019/1/30
 * @since 1.0.0
 */
@Controller
@RequestMapping("table")
public class TableController {
    @GetMapping("list")
    @ResponseBody
    public String list(){
        String result="{\n" +
                "\t\"total\": 3,\n" +
                "\t\"rows\": [{\n" +
                "\t\t\"id\": \"442cada7782d4bd0931bef90f60d6648\",\n" +
                "\t\t\"contractTempId\": \"TEMP-20181020164628\",\n" +
                "\t\t\"contractTempName\": \"TEMP-20181020164628\",\n" +
                "\t\t\"contractUrl\": \"http://127.0.0.1:8088/files/0c26fe11-74fb-4cc7-a371-6c7a1b5e2c53.jpg\",\n" +
                "\t\t\"createTime\": \"2018-10-20 16:46:28\",\n" +
                "\t\t\"createUserId\": \"1\",\n" +
                "\t\t\"deleted\": 0\n" +
                "\t}, {\n" +
                "\t\t\"id\": \"50a866688a2d4bfeafc9d4d427cbcfd2\",\n" +
                "\t\t\"contractTempId\": \"TEMP-20181020171028\",\n" +
                "\t\t\"contractTempName\": \"456\",\n" +
                "\t\t\"contractUrl\": \"http://127.0.0.1:8088/files/eb25e8f9-d4d8-414d-81dd-8c5a2c5e6053.jpg\",\n" +
                "\t\t\"createTime\": \"2018-10-20 17:10:28\",\n" +
                "\t\t\"createUserId\": \"1\",\n" +
                "\t\t\"deleted\": 0\n" +
                "\t}, {\n" +
                "\t\t\"id\": \"d7b49b398f454653848688ca7fbf0d75\",\n" +
                "\t\t\"contractTempId\": \"TEMP-20181111174908\",\n" +
                "\t\t\"contractTempName\": \"测试合同模板\",\n" +
                "\t\t\"contractUrl\": \"http://127.0.0.1:8099/files/e97cf303-6cf4-4258-bb10-908c13cf2497.doc\",\n" +
                "\t\t\"createTime\": \"2018-11-11 17:49:08\",\n" +
                "\t\t\"createUserId\": \"1\",\n" +
                "\t\t\"deleted\": 0\n" +
                "\t}]\n" +
                "}";
        return result;
    }
    @GetMapping("index")
    public String index(){
        return "table";
    }
}